<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/custom/custom/Base_DesktopMenu.js此处编写
 -->
 <template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
  </template>
  <script>
    import extend from "@/extension/Raw/RawRawmanagements.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'RawmanagementId',
                footer: "Foots",
                cnName: '原料管理',
                name: 'Raw/RawRawmanagements',
                url: "/Rawmanagement/",
                sortName: "RawmanagementId"
            });
            const editFormFields = ref({"RawmanagementId":"","RawmanagementBh":"","RawmanagementName":"","FlName":"","SizeName":"","XinghaoName":"","ShuxingName":"","DanWeiName":"","RawmanagementKCNum":"","LxName":"","RawmanagementState":"","RawmanagementYLNum":"","RawmanagementBJNum":"","RawmanagementSx":"","RawmanagementXx":"","RawmanagementWZ":"","RawmanagementCreateDate":"","RawmanagementDerc":"","RawmanagementPic":"",});
            
            const editFormOptions = ref([
            [{"title":"原料管理编号","required":true,"field":"RawmanagementBh","type":"text"}],
            [{"title":"原料管理名称","required":true,"field":"RawmanagementName","type":"text"}],
              [{"dataKey":"FlNamee","data":[],"title":"分类名称","required":true,"field":"FlName","type":"select"}],
              [{"dataKey":"SizeNamee","data":[],"title":"尺寸名称","required":true,"field":"SizeName","type":"select"}],
              [{"dataKey":"XinghaoNamee","data":[],"title":"型号名称","required":true,"field":"XinghaoName","type":"select"}],
              [{"dataKey":"ShuxingNamee","data":[],"title":"属性名称","required":true,"field":"ShuxingName","type":"select"}],
              [{"dataKey":"DanWeiNamee","data":[],"title":"单位名称","required":true,"field":"DanWeiName","type":"select"}],
              [{"title":"库存数量","required":true,"field":"RawmanagementKCNum","type":"text"}],
              [{"dataKey":"LxNamee","data":[],"title":"原料类型名称","required":true,"field":"LxName","type":"select"}],
              [{"dataKey":"cq","data":[],"title":"状态","required":true,"field":"RawmanagementState","type":"switch"}],
              [{"title":"原料数量","required":true,"field":"RawmanagementYLNum","type":"text"}],
              [{"title":"报警天数","required":true,"field":"RawmanagementBJNum","type":"text"}],
              [{"title":"库存上限","required":true,"field":"RawmanagementSx","type":"text"}],
              [{"title":"库存下限","required":true,"field":"RawmanagementXx","type":"text"}],
              [{"title":"原料位置","required":true,"field":"RawmanagementWZ","type":"text"}],
              [{field:'RawmanagementCreateDate',title:'库存收发时间',type:'datetime',sort:true,width:200,align:'left',sort:true}],
              [{"title":"备注","required":true,"field":"RawmanagementDerc","type":"text"}],
              [{"title":"照片","required":true,"field":"RawmanagementPic","type":"text"}],
                            ]);
            const searchFormFields = ref({"RawmanagementId":"","RawmanagementBh":"","RawmanagementName":"","FlName":"","SizeName":"","XinghaoName":"","ShuxingName":"","DanWeiName":"","RawmanagementKCNum":"","LxName":"","RawmanagementState":"","RawmanagementYLNum":"","RawmanagementBJNum":"","RawmanagementSx":"","RawmanagementXx":"","RawmanagementWZ":"","RawmanagementCreateDate":"","RawmanagementDerc":"","RawmanagementPic":"",});
            const searchFormOptions = ref([[{"title":"菜单名称","field":"MenuName","type":"like"}]]);
            const columns = ref([{field:'RawmanagementId',title:'原料管理主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                      {field:'RawmanagementBh',title:'原料管理编号',type:'int',bind:{ key:'MenuList',data:[]},width:80,require:true,align:'left',sort:true},
                      

                       {field:'RawmanagementBh',title:'原料管理编号',type:'int',bind:{ key:'MenuList',data:[]},width:80,require:true,align:'left',sort:true},
        {field:'RawmanagementName',title:'原料管理名称',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
        {field:'XinghaoName',title:'型号名称',type:'byte',bind:{ key:'XinghaoNamee',data:[]},width:110,require:true,align:'left'},
        {field:'DanWeiName',title:'单位',type:'byte',bind:{ key:'DanWeiNamee',data:[]},width:110,require:true,align:'left'},
        {field:'SizeName',title:'尺寸',type:'byte',bind:{ key:'SizeNamee',data:[]},width:110,require:true,align:'left'},
                    
                       {field:'RawmanagementName',title:'原料管理名称',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                       {field:'FlName',title:'分类名称',type:'string',width:120,readonly:true,require:true,align:'left'},
                       {field:'SizeName',title:'尺寸名称',type:'byte',bind:{ key:'cq',data:[]},width:110,require:true,align:'left'},
                       {field:'XinghaoName',title:'型号名称',type:'string',width:120,readonly:true,require:true,align:'left'},
                       {field:'ShuxingName',title:'属性名称',type:'byte',bind:{ key:'cq',data:[]},width:110,require:true,align:'left'},
                       {field:'DanWeiName',title:'单位名称',type:'byte',bind:{ key:'cq',data:[]},width:110,require:true,align:'left'},
                       {field:'RawmanagementKCNum',title:'库存数量',type:'byte',bind:{ key:'cq',data:[]},width:110,require:true,align:'left'},
                       {field:'LxName',title:'原料类型名称',type:'byte',bind:{ key:'cq',data:[]},width:110,require:true,align:'left'},

                       {field:'RawmanagementYLNum',title:'原料数量',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                       {field:'RawmanagementBJNum',title:'报警天数',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                       {field:'RawmanagementSx',title:'库存上限',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                       {field:'RawmanagementXx',title:'库存下限',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                       {field:'RawmanagementWZ',title:'原料位置',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                       {field:'RawmanagementCreateDate',title:'申请时间',type:'datetime',sort:true,width:200,align:'left',sort:true},
                       {field:'RawmanagementDerc',title:'备注',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                       {field:'RawmanagementPic',title:'照片',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                     ]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
  </script>
  